//
//  HomeHotCell.m
//  CarUser
//
//  Created by 王森林 on 2018/12/4.
//  Copyright © 2018年 王森林. All rights reserved.
//

#import "HomeHotCell.h"
#import "HomeDetailView.h"
#import "ChooseResultViewController.h"
@interface HomeHotCell()
@property (nonatomic, strong) HomeDetailView *homeDetailView;
@end
@implementation HomeHotCell

- (void)createUI
{
    [self.contentView removeAllSubviews];
    [self.contentView addSubview:self.homeDetailView];
    [self createConstraint];
    [self showSeparatorWithY:45.5];
    
}


- (void)createConstraint
{
 
    
    [self.homeDetailView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.contentView.mas_top).offset(0);
        (void)make.left.and.right;
        make.height.mas_equalTo(48);
    }];
    
    
}

- (HomeDetailView *)homeDetailView
{
    if (!_homeDetailView) {
        _homeDetailView = [[HomeDetailView alloc] initWithType:HOME_DETAIL_TYPE_NUMBER withBlock:^(id  _Nonnull response) {
            ChooseResultViewController  *controller  = [[ChooseResultViewController alloc] init];
            controller.type = @"1";
            controller.pushType = 1;
            controller.sfrx00  = @"1";
            [[self  viewController].navigationController pushViewController:controller animated:YES];
        }];
    }
    return _homeDetailView;
}

@end
